
<?

require_once ("application.list.inc");

global $_GLOBAL_DBH;
global $_OBJECT_IFACE_PANEL;

$indexes = array (
	title=>array (label=>"Title",order=>"DEFAULT",wrapper=>"vmc_icon_assignment"),
	last=>array (label=>"Last",order=>"DEFAULT",wrapper=>"vmc_icon_user"),
	first=>array (label=>"First",order=>"DEFAULT"),
	status=>array (label=>"Status",order=>"DEFAULT",
		values=>array (
			assign=>"Assign",
			forward=>"Forward",
			reject=>"Reject",
			accept=>"Accept",
			/* assign=>"<div class=\"vmc_icon_assign\">Assign</div>",
			forward=>"<div class=\"vmc_icon_assign\">Forward</div>",
			reject=>"<div class=\"vmc_icon_assign\">Reject</div>",
			accept=>"<div class=\"vmc_icon_assign\">Accept</div>", */
		),
	),
	details=>array (label=>"Details",order=>"DEFAULT",wrapper=>"vmc_icon_detail"),
	cdate=>array (label=>"Create Date",order=>"DEFAULT",wrapper=>"vmc_icon_date"),
);

$object_ctl = "/admin/projects/projects/fs_projects.php?fs_tab=tasks&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_tasks&fs_action=view&fs_tab_tasks=assignment&fs_tab_option_tasks=fs_assignment&task_id={$_REQUEST["task_id"]}&";
$link_options = "&fs_tab=tasks&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_tasks&fs_action=view&fs_tab_tasks=assignment&task_id={$_REQUEST["task_id"]}";
$list_options = array ();

$_OBJECT_IFACE_LIST = _app_create_list_object (array (
                db_conn=>$_GLOBAL_DBH,
                indexes=>$indexes,
		list_count=>"SELECT COUNT(*) FROM project_task_assignment WHERE task_id={$_REQUEST["task_id"]}",
		list_select=>"SELECT project_task_assignment.*,users.last,users.first,project_tasks.title FROM project_task_assignment,users,project_tasks WHERE project_task_assignment.task_id={$_REQUEST["task_id"]} AND project_task_assignment.user_id=users.id AND project_task_assignment.task_id=project_tasks.id",
                list_id=>"lc_project_task_assignment",
                list_options=>$list_options,
                primary_key=>"id",
                primary_relation=>"assignment_id",
                link_options=>$link_options,
                object_ctl=>$object_ctl
));


$_OBJECT_IFACE_TABBING_PANEL->insert_container ($_OBJECT_IFACE_LIST);

?>
